from app import app
from flask import render_template
from flask import request, url_for, redirect


# 根目录路由配置
@app.route('/')
@app.route('/index')
def index():
    return render_template('index.html')

@app.route('/login', methods=['GET', 'POST'])
def login():
    return render_template('login.html')


@app.route('/about', methods=['GET', 'POST'])
def about():
    if request.method == 'GET':
        return redirect(url_for('login'))
    else:
        return render_template('about.html')

        
# 启动项目
if __name__ == '__main__':
    app.run(debug=True)
    